import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/game_total_list_entity.dart';

GameTotalListEntity $GameTotalListEntityFromJson(Map<String, dynamic> json) {
  final GameTotalListEntity gameTotalListEntity = GameTotalListEntity();
  final double? id = jsonConvert.convert<double>(json['id']);
  if (id != null) {
    gameTotalListEntity.id = id;
  }
  final String? nameZh = jsonConvert.convert<String>(json['nameZh']);
  if (nameZh != null) {
    gameTotalListEntity.nameZh = nameZh;
  }
  final String? nameEn = jsonConvert.convert<String>(json['nameEn']);
  if (nameEn != null) {
    gameTotalListEntity.nameEn = nameEn;
  }
  final String? nameTha = jsonConvert.convert<String>(json['nameTha']);
  if (nameTha != null) {
    gameTotalListEntity.nameTha = nameTha;
  }
  final String? pictureZh = jsonConvert.convert<String>(json['pictureZh']);
  if (pictureZh != null) {
    gameTotalListEntity.pictureZh = pictureZh;
  }
  final String? pictureEn = jsonConvert.convert<String>(json['pictureEn']);
  if (pictureEn != null) {
    gameTotalListEntity.pictureEn = pictureEn;
  }
  final String? pictureTha = jsonConvert.convert<String>(json['pictureTha']);
  if (pictureTha != null) {
    gameTotalListEntity.pictureTha = pictureTha;
  }
  final double? buttontype = jsonConvert.convert<double>(json['buttontype']);
  if (buttontype != null) {
    gameTotalListEntity.buttontype = buttontype;
  }
  final double? screens = jsonConvert.convert<double>(json['screens']);
  if (screens != null) {
    gameTotalListEntity.screens = screens;
  }
  final String? buttonnameZh = jsonConvert.convert<String>(
      json['Buttonname_Zh']);
  if (buttonnameZh != null) {
    gameTotalListEntity.buttonnameZh = buttonnameZh;
  }
  final String? buttonnameEn = jsonConvert.convert<String>(
      json['Buttonname_En']);
  if (buttonnameEn != null) {
    gameTotalListEntity.buttonnameEn = buttonnameEn;
  }
  final String? buttonnameTha = jsonConvert.convert<String>(
      json['Buttonname_Tha']);
  if (buttonnameTha != null) {
    gameTotalListEntity.buttonnameTha = buttonnameTha;
  }
  final String? address = jsonConvert.convert<String>(json['address']);
  if (address != null) {
    gameTotalListEntity.address = address;
  }
  final String? promotionalpictureZh = jsonConvert.convert<String>(
      json['Promotionalpicture_Zh']);
  if (promotionalpictureZh != null) {
    gameTotalListEntity.promotionalpictureZh = promotionalpictureZh;
  }
  final String? promotionalpictureEn = jsonConvert.convert<String>(
      json['Promotionalpicture_En']);
  if (promotionalpictureEn != null) {
    gameTotalListEntity.promotionalpictureEn = promotionalpictureEn;
  }
  final String? promotionalpictureTha = jsonConvert.convert<String>(
      json['Promotionalpicture_Tha']);
  if (promotionalpictureTha != null) {
    gameTotalListEntity.promotionalpictureTha = promotionalpictureTha;
  }
  final String? featureZh = jsonConvert.convert<String>(json['feature_Zh']);
  if (featureZh != null) {
    gameTotalListEntity.featureZh = featureZh;
  }
  final String? featureEn = jsonConvert.convert<String>(json['feature_En']);
  if (featureEn != null) {
    gameTotalListEntity.featureEn = featureEn;
  }
  final String? featureTha = jsonConvert.convert<String>(json['feature_Tha']);
  if (featureTha != null) {
    gameTotalListEntity.featureTha = featureTha;
  }
  final double? content = jsonConvert.convert<double>(json['content']);
  if (content != null) {
    gameTotalListEntity.content = content;
  }
  final String? googledownload = jsonConvert.convert<String>(
      json['googledownload']);
  if (googledownload != null) {
    gameTotalListEntity.googledownload = googledownload;
  }
  final String? appledownload = jsonConvert.convert<String>(
      json['appledownload']);
  if (appledownload != null) {
    gameTotalListEntity.appledownload = appledownload;
  }
  final List<int>? classify = (json['Classify'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<int>(e) as int).toList();
  if (classify != null) {
    gameTotalListEntity.classify = classify;
  }
  final int? needLogin = jsonConvert.convert<int>(json['Loginh5']);
  if (needLogin != null) {
    gameTotalListEntity.needLogin = needLogin;
  }
  final int? titledisplay = jsonConvert.convert<int>(json['titledisplay']);
  if (titledisplay != null) {
    gameTotalListEntity.titledisplay = titledisplay;
  }
  return gameTotalListEntity;
}

Map<String, dynamic> $GameTotalListEntityToJson(GameTotalListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['nameZh'] = entity.nameZh;
  data['nameEn'] = entity.nameEn;
  data['nameTha'] = entity.nameTha;
  data['pictureZh'] = entity.pictureZh;
  data['pictureEn'] = entity.pictureEn;
  data['pictureTha'] = entity.pictureTha;
  data['buttontype'] = entity.buttontype;
  data['screens'] = entity.screens;
  data['Buttonname_Zh'] = entity.buttonnameZh;
  data['Buttonname_En'] = entity.buttonnameEn;
  data['Buttonname_Tha'] = entity.buttonnameTha;
  data['address'] = entity.address;
  data['Promotionalpicture_Zh'] = entity.promotionalpictureZh;
  data['Promotionalpicture_En'] = entity.promotionalpictureEn;
  data['Promotionalpicture_Tha'] = entity.promotionalpictureTha;
  data['feature_Zh'] = entity.featureZh;
  data['feature_En'] = entity.featureEn;
  data['feature_Tha'] = entity.featureTha;
  data['content'] = entity.content;
  data['googledownload'] = entity.googledownload;
  data['appledownload'] = entity.appledownload;
  data['Classify'] = entity.classify;
  data['Loginh5'] = entity.needLogin;
  data['titledisplay'] = entity.titledisplay;
  return data;
}

extension GameTotalListEntityExt on GameTotalListEntity {
  GameTotalListEntity copyWith({
    double? id,
    String? nameZh,
    String? nameEn,
    String? nameTha,
    String? pictureZh,
    String? pictureEn,
    String? pictureTha,
    double? buttontype,
    double? screens,
    String? buttonnameZh,
    String? buttonnameEn,
    String? buttonnameTha,
    String? address,
    String? promotionalpictureZh,
    String? promotionalpictureEn,
    String? promotionalpictureTha,
    String? featureZh,
    String? featureEn,
    String? featureTha,
    double? content,
    String? googledownload,
    String? appledownload,
    List<int>? classify,
    int? needLogin,
    int? titledisplay,
  }) {
    return GameTotalListEntity()
      ..id = id ?? this.id
      ..nameZh = nameZh ?? this.nameZh
      ..nameEn = nameEn ?? this.nameEn
      ..nameTha = nameTha ?? this.nameTha
      ..pictureZh = pictureZh ?? this.pictureZh
      ..pictureEn = pictureEn ?? this.pictureEn
      ..pictureTha = pictureTha ?? this.pictureTha
      ..buttontype = buttontype ?? this.buttontype
      ..screens = screens ?? this.screens
      ..buttonnameZh = buttonnameZh ?? this.buttonnameZh
      ..buttonnameEn = buttonnameEn ?? this.buttonnameEn
      ..buttonnameTha = buttonnameTha ?? this.buttonnameTha
      ..address = address ?? this.address
      ..promotionalpictureZh = promotionalpictureZh ?? this.promotionalpictureZh
      ..promotionalpictureEn = promotionalpictureEn ?? this.promotionalpictureEn
      ..promotionalpictureTha = promotionalpictureTha ??
          this.promotionalpictureTha
      ..featureZh = featureZh ?? this.featureZh
      ..featureEn = featureEn ?? this.featureEn
      ..featureTha = featureTha ?? this.featureTha
      ..content = content ?? this.content
      ..googledownload = googledownload ?? this.googledownload
      ..appledownload = appledownload ?? this.appledownload
      ..classify = classify ?? this.classify
      ..needLogin = needLogin ?? this.needLogin
      ..titledisplay = titledisplay ?? this.titledisplay;
  }
}